/*
 * @Descripttion:
 * @Author: voanit
 * @Date: 2022-03-28 08:23:16
 * @LastEditors: voanit
 * @LastEditTime: 2022-04-03 10:06:16
 */
import request from "@/utils/request";
/**
 * @description: 登录
 * @param {*} data {modile, password}
 * @return {*} Promise
 */
export function loginApi(data) {
  return request({
    url: "/sys/login",
    method: "post",
    data,
  });
}

export function getInfo() {
  return request({
    url: "/sys/profile",
    method: "post",
    // params: { token: "12cdfde8-9d53-463e-a600-acc148a136a5" },
    // headers: {
    //   Authorization: "Bearer " + token,
    // },
  });
}
/**
 * @description: 获取用户头像
 * @param {*} id 用户id
 * @return {*}
 */
export function getUserDetailById(id) {
  return request({
    url: `/sys/user/${id}`,
  });
}
